home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 441 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  2.2 KB

  1. Path: chronicle.mti.sgi.com!austern
  2. From: kanze@gabi-soft.fr (J. Kanze)
  3. Newsgroups: comp.std.c++
  4. Subject: Re: Portability. Modules. WAS: RE:  Are all Windows programs ill-formed?
  5. Date: 22 Feb 1996 09:15:44 PST
  6. Organization: GABI Software, Sarl.
  7. Approved: austern@isolde.mti.sgi.com
  8. Message-ID: <KANZE.96Feb22142953@gabi.gabi-soft.fr>
  9. References: <UPMAIL04.199602192354270852@msn.com>
  10. NNTP-Posting-Host: isolde.mti.sgi.com
  11. X-Original-Date: 22 Feb 1996 13:29:53 GMT
  12. In-Reply-To: "Eugene Lazutkin"'s message of 20 Feb 96 07:20:29 GMT
  13. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  14.     iQBVAwUBMSyk70y4NqrwXLNJAQHpmwH/esy7ECnhOxnGiZXu1eKtd34Pe0o1KLGr
  15.     0ap3udr2z3/YqjnpH0IXjWQ6PYLUoSDYRMZyEjXLVVKCAXaIMRwuQg==
  16.     =6hOX
  17. Originator: austern@isolde.mti.sgi.com
  18.  
  19. In article <UPMAIL04.199602192354270852@msn.com> "Eugene Lazutkin"
  20. <INT@msn.com> writes:
  21.  
  22. |> I don't care about the actual implementation.  Virtually there is a main().
  23. |> I know that all my static constructors will be executed BEFORE main(), 
  24. |> WinMain() or any other head procedure.  It is important.  It doesn't make 
  25. |> any difference for me whether or not main() is the first called subroutine.
  26. |> In fact, in most cases it is not true.  Almost all platforms call some
  27. |> stub before your main().
  28.  
  29. You know something that is *NOT* guaranteed by the draft standard.
  30. There is no guarantee that static constructors are executed before main,
  31. although in fact, this is the case for all implementations I am familiar
  32. with, at least as long as the static variables are not in DLL's.  (And:
  33. I've got more than a little code which depends on this.  Despite it not
  34. being guaranteed.)
  35. -- 
  36. James Kanze           (+33) 88 14 49 00          email: kanze@gabi-soft.fr
  37. GABI Software, Sarl., 8 rue des Francs Bourgeois, 67000 Strasbourg, France
  38. Conseils, itudes et rialisations en logiciel orienti objet --
  39.               -- A la recherche d'une activiti dans une region francophone
  40. ---
  41. [ To submit articles: Try just posting with your newsreader.  If that fails,
  42.                       use mailto:std-c++@ncar.ucar.edu
  43.   FAQ:    http://reality.sgi.com/employees/austern_mti/std-c++/faq.html
  44.   Policy: http://reality.sgi.com/employees/austern_mti/std-c++/policy.html
  45.   Comments? mailto:std-c++-request@ncar.ucar.edu 
  46. ]
  47.